package com.itheima.java.ai.langchin4j.server;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.java.ai.langchin4j.entity.Appointment;

import java.time.LocalDate;
import java.util.List;

public interface AppointmentService extends IService<Appointment> {
    
    // 保留原有方法以兼容现有代码
    Appointment getOne(Appointment appointment);
    
    Appointment getOne(String username, String idCard, String department, String date, String time, String doctorName);
    
    // 新增方法
    /**
     * 创建预约
     */
    Appointment createAppointment(Long userId, Long doctorId, Long scheduleId, LocalDate appointmentDate, String timeSlot, String symptoms);
    
    /**
     * 获取用户的预约列表
     */
    List<Appointment> getUserAppointments(Long userId);
    
    /**
     * 获取医生的预约列表
     */
    List<Appointment> getDoctorAppointments(Long doctorId);
    
    /**
     * 根据状态获取用户预约
     */
    List<Appointment> getUserAppointmentsByStatus(Long userId, String status);
    
    /**
     * 获取医生指定日期的预约
     */
    List<Appointment> getDoctorAppointmentsByDate(Long doctorId, LocalDate date);
    
    /**
     * 更新预约状态
     */
    boolean updateAppointmentStatus(Long appointmentId, String status);
    
    /**
     * 取消预约
     */
    boolean cancelAppointment(Long appointmentId, Long userId);
    
    /**
     * 确认预约
     */
    boolean confirmAppointment(Long appointmentId);
}
 